package com.service;

import com.mapper.SysRoleMapper;
import com.pojo.SysRole;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service("roleService")
public class SysRoleServiceImpl implements SysRoleService {
    @Resource
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> roleList() {
        List<SysRole> sysRoleList=new ArrayList<SysRole>();
        try {
            sysRoleList=sysRoleMapper.roleList();
        }catch (Exception e){
            e.printStackTrace();
        }
        return sysRoleList;
    }

    @Override
    public List<SysRole> simpleList() {
        List<SysRole> sysRoleList=new ArrayList<>();
        try {
            sysRoleList=sysRoleMapper.simpleList();
        }catch (Exception e){
            e.printStackTrace();
        }
        return sysRoleList;
    }
}
